#ifndef P1_H
#define P1_H
#include <iostream>
#include <vector>
#include <fstream>
#include <stdlib.h>
#include <sstream>
#include <iterator>
#include <algorithm>
#include <stdint.h>
#include <cstdlib>
#include <ctime>

#define ITER 100000

#ifdef __amd64
inline uint64_t rdtsc(){
	uint32_t lo, hi;
	__asm__ __volatile__ (
	"xorl %%eax, %%eax\n"
	"cpuid\n"
	"rdtsc\n"
	: "=a" (lo), "=d" (hi)
	:
	: "%ebx", "%ecx" );
	return (uint64_t)hi << 32 | lo;
}
#endif


using namespace std;


vector<int> cargar(istringstream& is, const int n);
int resolverGoloso(const int n, const int k, const vector<int>& inter);
int resolverBBin(const int n, const int k, const vector<int>& inter);
void salida(ostream& out, int sol);

#endif // P1_H
